package cn.house.dao;

import java.util.List;

import cn.house.entity.District;
import util.HibernateUtil;

public class DistrictDaoImpl implements DistrictDao{

	@Override
	public List<District> listAll() {
		return HibernateUtil.currentSession().createQuery("from District").list();
	}

	@Override
	public District getDistrictById(Integer id) {
		return (District) HibernateUtil.currentSession().get(District.class, id);
	}
}
